package com.xiaoxi.common.constant.enumeration.statuscode.system;

import com.xiaoxi.common.constant.enumeration.statuscode.ParentEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName UserEnums
 * @Description
 * @Author xiaoxi
 * @Date 2022/7/10 11:19
 * @Version 1.0
 */
public enum LoginSystemEnums implements ParentEnum {

    INCORRECT_USER_ID("B001","未找到该用户"),
    PRIVATE_KEY_FAIL("B002","密钥异常");

    private final String code;
    private final String message;

    LoginSystemEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public Map<String, String> format() {
        Map<String, String> enumData = new HashMap<>();
        enumData.put("code", this.code);
        enumData.put("message", this.message);
        return enumData;
    }
}
